import re


class Topic:
    def __init__(self, data):
        self.data = {}
        self.data['desc'] = data['desc1']
        self.data['pic'] = data['pic']
        self.data['title'] = data['title_sub']
        topic_info = re.split(' ', data['desc2'])
        self.data['talk_num'] = topic_info[0]
        self.data['read_num'] = topic_info[1]
